﻿using System;
using System.Collections;
using System.Linq;

namespace ConsoleApp17
{
    class Program
    {
        static void Main(string[] args)
        {
            Stack stack1 = new Stack();
            stack1.Push("hahaha");
            stack1.Push("hehehe");
            Console.WriteLine("hhhhhh");
            object[] obj = stack1.ToArray();
            stack1.Pop();

            foreach(var v in obj)
            {
                Console.WriteLine(v);
            }
            bool index = obj.Contains("hhh");
            Console.WriteLine(index);
            while(stack1.Count !=0 )
            {
                Console.WriteLine(stack1.Pop());
            }
        }
    }
}
